package com.study.spring.ch03.pojo;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Min;
import javax.validation.constraints.Size;

public class UserModel {
	
	private WorkInfoModel workInfo;
	
	
	public WorkInfoModel getWorkInfo() {
		return workInfo;
	}

	public void setWorkInfo(WorkInfoModel workInfo) {
		this.workInfo = workInfo;
	}

	@NotNull(message = "{username.not.empty}")
	@Size(min = 3, max = 10, message = "length between 3 and 10")
	private String username;
	@Min(value = 20, message = "{age.min}")
	private Integer age;

	public Integer getAge() {
		return age;
	}

	public void setAge(Integer age) {
		this.age = age;
	}

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}
}
